package com.cms.controller.front;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Controller - 搜索
 *
 *
 *
 */
@Slf4j
@Controller("frontSearchController")
@RequestMapping("/search")
public class SearchController extends BaseController {


    /**
     * 搜索
     */
    @RequestMapping
    public String index(String keyword,Integer pageNumber, ModelMap modelMap) {
        log.info("信息搜索...");
        if(pageNumber==null){
            pageNumber = 1;
        }
        modelMap.addAttribute("pageNumber", pageNumber);
        modelMap.addAttribute("keyword", keyword);
        return "/templates/"+getCurrentTemplate()+"/search.html";
    }
}
